Maintaining versions of data in solid state memory

ABSTRACT

Various embodiments are directed to maintaining versions of data within a solid state memory. At least one request to write at least one dataset to a logical page of a solid state memory is received from a file system. At least one physical page in a data block of the solid state memory associated with the logical page is identified. A processor stores the dataset in the at least one physical page. At least one data versioning tag is associated with the at least one dataset in a data structure associated with the logical page. The data versioning tag identifies the at least one dataset as a given version of the logical page. The at least one dataset is maintained as accessible from the at least one physical page irrespective of subsequent write operations to the logical page in response to associating the at least one data versioning tag.

CROSS-REFERENCE TO RELATED APPLICATION

This application is related to the following applications entitled:“File System For Maintaining Data Versions In Solid State Memory”, Ser.No. ______, Attorney Docket No. YOR920120304US1; “Flash TranslationLayer System For Maintaining Data Versions In Solid State Memory”, Ser.No. ______, Attorney Docket No. YOR920120305US1; and: “Data VersioningIn Solid State Memory”, Ser. No. ______, Attorney Docket No.YOR920110701US1, all of which were filed on the same day as the presentapplication and are commonly assigned herewith to International BusinessMachines Corporation. These related applications are herein incorporatedby reference.

This application is also related to the following applications entitled:“Maintaining Versions Of Data In Solid State Memory”, Ser. No. ______,Attorney Docket No. YOR920120303US2; “File System For Maintaining DataVersions In Solid State Memory”, Ser. No. ______, Attorney Docket No.YOR920120304US2; “Flash Translation Layer System For Maintaining DataVersions In Solid State Memory”, Ser. No. ______, Attorney Docket No.YOR920120305US2; and “Data Versioning In Solid State Memory”, Ser. No.______, Attorney Docket No. YOR920110701US2, all of which were filed onthe ______ and are commonly assigned herewith to International BusinessMachines Corporation. These related applications are herein incorporatedby reference.

BACKGROUND

Embodiments of the present invention generally relate to dataversioning, and more particularly relate to data versioning in solidstate memory.

Solid state memory, such as flash memory, is becoming increasinglypopular for storing data. For example, solid-state Disks (SSDs) thatimplement flash memory are emerging as an important candidate in themarket for data storage (both for file-systems and otherwise). WhileSSDs provide efficient read access, writes are more complex becausein-place updates are generally not possible in current solid statememories. Therefore, SSD vendors normally ship SSDs with a layerreferred to as the Flash Translation Layer (FTL) that remaps every writeto a different block and exposes an SSDs as a standard block device(e.g., a hard disk drive).

BRIEF SUMMARY

In one embodiment, a method for maintaining versions of data within asolid state memory is disclosed. The method comprises receiving, from afile system, at least one request to write at least one dataset to alogical page of a solid state memory. At least one physical page in adata block of the solid state memory associated with the logical page isidentified. A processor stores the at least one dataset in the at leastone physical page. At least one data versioning tag is associated withthe at least one dataset in a data structure associated with the logicalpage. The at least one data versioning tag identifies the at least onedataset as a given version of the logical page. The at least one datasetis maintained as accessible from the at least one physical pageirrespective of subsequent write operations to the logical page inresponse to associating the at least one data versioning tag.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The accompanying figures where like reference numerals refer toidentical or functionally similar elements throughout the separateviews, and which together with the detailed description below areincorporated in and form part of the specification, serve to furtherillustrate various embodiments and to explain various principles andadvantages all in accordance with the present invention, in which:

FIG. 1 is a block diagram illustrating one example of an operatingenvironment according to one embodiment of the present invention;

FIG. 2 is a transactional diagram illustrating one example of writingdata to a solid state memory according to one embodiment of the presentinvention.

FIG. 3 shows one example of a data versioning tag according to oneembodiment of the present invention;

FIG. 4 shows one example of tag and group data structures for maintainversions of data within solid state memory according to one embodimentof the present invention;

FIG. 5 shows examples of data versioning tags for different physicalpages of a given logical page according to one embodiment of the presentinvention;

FIG. 6 is an operational flow diagram illustrating one example of aflash translation layer maintaining a data structure (tag and groupinformation) for supporting data versions within a solid state memoryaccording to one embodiment of the present invention;

FIG. 7 is an operational flow diagram illustrating one example of aflash translation layer storing a given version of data within a solidstate memory according to one embodiment of the present invention;

FIG. 8 is an operational flow diagram illustrating one example of a filesystem interacting with a flash translation in a data versioning contextaccording to one embodiment of the present invention;

FIG. 9 is an operational flow diagram illustrating one example of aflash translation layer interacting with a file system for performingoperations on versions of data within a solid state memory according toone embodiment of the present invention; and

FIG. 10 illustrates one example of an information processing systemaccording to one embodiment of the present invention.

DETAILED DESCRIPTION

Operating Environment

FIG. 1 shows one example of an operating environment 100 according toone embodiment of the present invention. In this embodiment, theoperating environment 100 is a solid state memory based storage system100 such as, but not limited to, a solid-state disk (SSD) implementingflash memory. Solid-state disks or drives are data storage devices thatpersistently store data on solid-state memory within the device. SSDstypically provide access to their stored data in the same manner astraditional block I/O hard disk drives. The storage system 100, in oneembodiment, at least comprises a communication interface 102, a flashcontroller 104, and solid state memory (flash memory) 106. Thecommunication interface 102 allows external devices such as informationprocessing systems and networking devices to interface with the storagesystem 100. The communication interface 102 can implement one or morecommunication protocols such as, but not limited to, Serial AdvancedTechnology Attachment (SATA), Universal Serial Bus (USB), Small ComputerSystem Interface (SCSI), and/or the like.

The flash controller 104 controls the transfer of data between the flashmemory 106 and external devices coupled to the communication interface102. The flash controller 104 can also be coupled to other memory suchas random access memory (RAM) buffers within a buffer layer 108. Thismemory can act as a cache for a processor 110 of the system 100 and/or aread/write buffer between the flash memory 106 and the communicationinterface 102. The flash controller 104, in this embodiment, comprisesthe processor 110 that can include software and/or firmware forperforming various operations such as, but not limited to,logical-to-physical translation operations, wear-leveling,garbage-collection, data versioning operations, and/or the like. Theflash controller 104 also includes a host layer 112 and the buffer layer108. The host layer 112 controls the flow of data between the flashcontroller 104 and the communication interface 102. The buffer layer 108manages the buffering of data between the flash memory 106 and thecommunication interface 102 in one or more of memory buffers.

The flash controller 104 further comprises a flash translation layer(FTL) 114 that can be implemented as software, hardware, or acombination thereof within the flash controller 104 and the processor110. The FTL 114 is coupled to one or more file systems 115 on a hostsystem (not shown). Standard file-systems, as well as, Redirect-on-Write(RoW) and Copy-on-Write (CoW) file-systems run on top of the storagesystem 100 by using it as any ordinary block device. In someembodiments, the FTL 114 is embedded into the file system where thefile-system, in addition to its normal, functionality, also comprisesfunctionality of the FTL. These types of file systems are referred asflash file systems.

The FTL 114 performs logical-to-physical (and physical-to-logical)address translation for data stored within the flash memory 106. The FTL114 maintains this mapping within one or more logical-to-physical (L2P)translation tables 116. The FTL 114, in one embodiment, also comprises adata versioning manager 120. The data versioning manager 120 maintainsand stores multiple versions 122, 124 of data within the flash memory106. Tag/group data 126 and one or more hash tables 128 for accessingthe tag/group data 126 is maintained by the data versioning manager 120for providing versioning mechanisms within the flash memory 106. Thedata versioning manager 120, tag and group data 126, and hash tables 128are discussed in greater detail below.

Data Versioning in Solid State Memory

As discussed above, the FTL 114 provides a data versioning mechanism(s)within the flash memory 106. This is advantageous over conventionalflash memory based storage systems, since conventional storage systemsgenerally do not provide any type of data versioning. This is becauseone characteristic of flash memory is that it does not supportoverwriting in place. For example, FIG. 2 shows one example of how dataversioning can be provided in flash memory 106 according to oneembodiment of the present invention. In the example of FIG. 2, a logstructure is utilized by the FTL 114 when writing data to the flashmemory 106. However embodiments of the present invention are not limitedto such as example. FIG. 2 shows an empty data block 202 comprising 8physical pages within the data block. It should be noted that FIG. 2only shows a portion of the physical pages within the data block 202 TheFTL 114, at T1, receives a request from the file system 115 to writedata to a given logical page number LPN3. The FTL 114 analyzes thetranslation table 116 to identify which physical page number in the datablock 202 the data should be written to. In the current example, the FTL114 determines that physical page number PPN3 is erased (free to bewritten). The FTL 114 then proceeds to write the data to PPN3, at T2 andmarks PPN3 as ‘valid’.

The FTL 114, at T3, receives a subsequent request from the file system115 to write data to LPN3. The FTL 114 once again analyzes thetranslation table 116, which currently maps LPN3 to PPN3. This indicatesthat data has been previously written for LPN3 in PPN3. Because flashmemory does not support overwriting in place, the FTL 114 needs to writethe new data for LPN3 in a new physical page, such as that in a cleanerase block 204 (e.g., log block), as shown in FIG. 2. A table or anarray 206 is maintained by the FTL 114 for the log block 204 where eachposition in the array corresponds to a physical page in the log block204. For example, FIG. 2 shows that the subsequent write request forLPN3 resulted in the FTL 114 writing the new data to physical pagenumber PPN1 of the log block, at T4. The first position of the array 206was updated to “3” to indicate that the first physical page PPN1 of thelog block corresponds to logical page number LPN3. In the currentexample, a “4” in the array 206 indicates that the correspondingphysical page in the log block 204 is erased (i.e., can be written to).However, any type of notation or bit can be used to provide thisindication.

With respect to the previously written to physical page PPN3 in the datablock 202, conventional flash based storage systems would invalidatethis physical page. This invalidated page is marked for garbagecollection, which recycles invalidated physical pages, consolidates thevalid pages into a new erase block, and cleans the old erase block.However, the FTL 114 of one or more embodiments prevents the previousphysical page PPN3 from being invalidated and associates a dataversioning tag 208 (herein referred to as “tag”) with physical pagePPN3. The tag 208 indicates that this physical page PPN3 and its dataare to be maintained/saved and not sent for garbage collection.

One example of a data versioning tag is shown in FIG. 3. In thisexample, a tag 200 comprises a tag group number field 302, an ID field304, and a tag field 306. The tag group number field 302 comprises thetag group number assigned to a physical page by the file system 115. Atag group is a collection of logical page numbers and their associatedphysical pages. File systems typically manage user data by internallydifferentiating the blocks as data blocks, indirect blocks, and inodeblocks. Data blocks generally contain user data. Indirect blocks containpointers to the data blocks (and to other indirect blocks). An inodeblock corresponds to a file or a directory in the file-system, where atree of indirect blocks usually arises from an inode block to finallyreach out to the data blocks. Therefore, in one embodiment, the filesystem 115 assigns a different tag group to inode blocks, indirectblocks, data blocks, and special blocks.

In one embodiment of the invention, the ID field 304 comprises anidentifier of a file or directory to which the data in the physical pageof the flash memory 106 is associated with. As discussed above each timethe file system 115 requests a write to the same logical page the FTL114 writes the data to a new physical page. Therefore, the FTL 114associates the ID 304 to each physical page associated with the samelogical page and also associates this ID to the logical page as well.The tag field 306 can comprise any type of information, such as aversion number, to be associated with the data of the physical page. Aversion number indicates what version of the data associated with thelogical page (which can comprise multiple physical pages) is within eachphysical page associated with tag. In one embodiment, the tag 300 isonly 8 bytes, but is not limited to such an example.

The tag and group information 126 is associated with physical andlogical pages. The tag and group information 126 comprises datastructures for allowing versions of data to be maintained within theflash memory 106, and to also allow versioning operations such assnapshot and rollback. A data structure can comprise one or more tables,lists (e.g., linked lists) for storing the tag and group information126. A single data structure can be used to store the tag and groupinformation 126 or multiple data structures can be used. In addition, asingle data structure can comprise one or more additional datastructures. For example, FIG. 4 shows one example of how the FTL 114maintains tag and group information for providing data versioning withflash memory. In particular, FIG. 4 shows that the tag and groupinformation 400 comprises a group table 402 for each group associatedwith the file system 115. The group table 402 comprises tag areas 404,406, 408 for each logical page associated with the group. A tag area 404comprises an entry 410 with the logical page number of the logical pageassociated with the group table entry 404, an entry 412 with the ID (asobtained from the tags associated with the physical pages of the logicalpage) associated with the logical page, an entry 414 with alogical-to-physical (L2P) pointer, an entry 416 with a tag list pointer,and an entry 418 with a pointer to the next item in the list (if oneexists). The L2P pointer points to the L2P entry 403 within thetranslation table 401 for the logical page. This L2P pointer, in onembodiment, is utilized when group operations (discussed later) areperformed with special IDs (to denote all the files/directories) where,when entries in the tag list are modified (for example during a rollbackor deletion etc.), the corresponding L2P entry may need to be updated.

The tag list pointer points to a tag list 420 (within the group table402) that is associated with the given logical page. A tag list 420identifies each physical page associated with the logical page and alsoincludes the tag (or tag information) of each physical page. Forexample, FIG. 4 shows that, for each physical page associated withlogical page LPN1, the tag list 420 comprises an entry 422 identifyingthe physical page number, an entry 424 with the tag associated with thephysical page, and an entry 424 with a pointer to the next entry in thetag list 420 for the next physical page associated with the logicalpage. FIG. 5 shows one example of the tags 502, 504, 506, 508 associatedwith physical pages PPN1, PPN2, PPN3, and PPN4 of logical page LPN1 inthe group table 402. As can be seen, the tag 502, 504, 506, 508 of eachphysical page comprises the same group number, Group1, since eachphysical page is part of the same group, Group1. Each tag 502, 504, 506,508 also includes the same ID, ID1, since the physical pages PPN1, PPN2,PPN3, and PPN4 are all part of the same inode (i.e., file or directory).The tags 502, 504, 506, 508 each have different version numbers sinceeach physical page PPN1, PPN2, PPN3, and PPN4 comprises a differentversion of the data associated with the logical page. In one embodiment,the higher the version number the more recent the version. However,other configurations are applicable as well.

Returning to FIG. 4, the FTL 114, in one embodiment, maps thelogical/physical pages to the group table 402 by including a pointer tothe tag area 404 within the translation table 401. For example, FIG. 4shows a translation table 401 comprising a plurality of entries. Eachentry 403 identifies a logical page, such as LPN1 and the most recentphysical page, such as PPN1, to which data for the logical page has beenwritten to. In addition, each entry 403 also comprises a tag pointer 405that points to the tag area 404 of the group table 402 associated withthe logical page. It should be noted that the tag pointer can be a nullpointer, which indicates that data versioning has not been activated forthis logical page and conventional translation operations are to beperformed. In other words, an entry for the logical page does not existwithin the tag area 404. In addition to the tag pointer 405 beingmaintained within the translation table 401, a hash table 428 can alsobe maintained by the FTL 114 to provide access to the tag areas 404 ofthe group table 402. For example, the hash table 428 can be used by theFTL 114 to identify tag areas 404 for a given logical page based on theID associated therewith.

The above configuration of the tag and group data 126 allows the FTL 114to maintain and store multiple versions of data within the flash memory106. As noted above, physical pages that are tagged are prevented frombeing invalidated and marked for garbage collection. The aboveconfiguration also allows for the file system to perform taggedreads/writes and data versioning operations such as snapshot operationsand rollback operations. It should be noted that a file system 115 isable to activate and deactivate data versioning within the flash memory106. In addition, the above configuration allows the file systems 115 ofa flash device to perform various operations associated with dataversioning such as creating snapshots, performing rollback operations,and the like. The FTL 114 also provides tagged operations to the filesystem 115 that allow data versioning to be performed at an individualblock level, file level, or a file-system level. These tagged operationsare discussed in greater detail below.

The following is a more detailed discussion on how a file system 115interacts with the FTL 114 to perform tagged read/writes and dataversioning operations. As discussed, the file system 114 of oneembodiment reserves a given number of groups in the flash memory anduses these groups in tagged operations such as tagged reads and taggedwrites. In one embodiment, the file system 115 uses a first group fortagged operations with respect to inodes, a second group for taggedoperations with respect to indirect blocks, a third group for taggedoperations with respect to data blocks, and a fourth group for taggedoperations with respect to special blocks.

Special blocks are blocks used to maintain file-system specificmetadata. For example, a file-system may use bitmaps to keep track ofall the free blocks in the disk space. This information, in oneembodiment, needs to be made persistent across system reboots.Therefore, a file-system can store this information in some blocksreferred to as special blocks. Special blocks maintain pointers to theseblocks from other blocks, such as the inode of the root or so called‘superblock’, which itself would be a special block. It should be notedthat additional groups or fewer groups can be utilized by the filesystem 115 as well. The file system 115 also uses the ID field of a tagdiscussed above to store the inode number of a file/directory. Thisenables the file system 115 to manage the versioning operations at afile/directory level efficiently. Therefore, the file system 115, in oneembodiment, maps the individual file/directories and their associatedblocks (data/indirect/inode) into groups and IDs provided by the FTL 114for efficient file-system level and file-level versioning operations.

In one embodiment, the file system 115 sends a tagged write request tothe FTL 114 in the form of WRITE(DATA, BLK#, TAG). The DATA variablecomprises the data to be written. The BLK# variable comprises the blocknumber (logical page number) that the data is to be written to. The TAGvariable comprises the tag to be associated with the physical page ofthe flash memory 106. As discussed above, the tag comprises a groupnumber associated with the logical page identified in the write request.The group number identifies if the write operation is to be performed onGroup1 (inodes), Group2 (indirect blocks), Group3 (data blocks), Group4(special blocks), etc. The tag also comprises the ID of thefile/directory (e.g., inode) associated with the data to be written andthe version number of the data.

When a tagged write request such as WRITE (DATA_XYZ, LPN3, (Group1, ID1,V2) is received, the FTL 114 analyzes the write request and identifiesthe logical page number to which the data is to be written to. Forexample, in the current example, the FTL 114 determines that the filesystem is requesting to write data DATA_XYZ to logical page number LPN3,similar to the example given above with respect to FIG. 2. The FTL 114then analyzes the L2P translation table 116 to identify a physical pagewithin the flash memory that corresponds to the logical page LPN3. Asnoted above, the physical page identified in the translation table 116is most recent physical page to which data has been written to for thelogical page. In the current example, the translation table 116currently maps LPN3 to physical page number PPN1. Therefore, The FTLwrites the data to physical page PPN2 (next erased/free page) in theflash memory block associated with LPN3. The FTL 114 also updates thetranslation table 116 to map logical page LPN3 to physical page PPN2.

In addition, the FTL 114 analyzes the tag to update the tag and groupdata 126 accordingly for logical page LPN3 and physical page PPN2. Inthe current example, the tag in the write request WRITE (DATA_XYZ, LPN3,TAG) is (Group1, ID1, V2). Therefore, because the tag is populated(non-null) the file system 115 is requesting data versioning to beperformed. As discussed above, the FTL 114 prevents any of the pagescomprising previously written data for the logical page from beinginvalidated by associating a tag therewith. Stated differently, the FTL114 saves these pages and their data for data versioning. Using the tagpointer in the translation table 116, the FTL 114 identifies the tagarea 404 associated with the logical page LPN3. The FTL 114 thenanalyzes the tag area 404 to identify the tag list pointer for locatingthe tag list 420 associated with LPN3. Once the tag list 420 is located,the FTL 114 updates the tag list 420 by adding a tag list entry for thephysical page just written to. For example, the FTL 114 adds a tag listentry for physical page number PPN2 that is mapped to the tag area entryfor logical page number LPN1. As discussed above, this tag list entryidentifies the physical page number PPN2 and also includes the tag(Group1, ID1, V2), which indicates that physical page number PPN2 isassociated with file/directory ID1 in Group1 and is the second version(V2) of the data associated with file/directory ID1. In one embodiment,the entries in the tag list 420 are organized with the most recentwritten to physical page being at the front of the list. However, otherconfigurations are applicable as well.

It should be noted that the tag sent with the write request can be null.In this situation, if a tag area entry does not exist for the logicalpage (as determined based on the tag pointer in the translation table116), conventional operations are performed where any previous writtendata for the logical page is invalidated and marked for garbagecollection, and the translation table 116 is updated accordingly. Stateddifferently, data versioning is not performed when the tag is null. Ifthe tag is a null tag and a tag area entry does exist for the logicalpage, the data is written to a new physical page and the translationtable 116 is updated accordingly.

When the file system 115 wants to read the latest (most recent) versionof a page, the file system 115 can send a read request to the FTL 114 inthe form of READ(BLK#) where BLK# is the logical page number which thefile system 115 wants to read. The FTL 114 analyzes the translationtable 116 to identify the physical page corresponding to the logicalpage number indicated in the read request. The FTL 114 retrieves thedata associated with the physical page and sends the data back to thefile system 115. In addition, the FTL 114 can also retrieve the tagassociated with the physical page from the tag and group data 126 andsend the tag to the file system 115 as well. The FTL 114 is able toidentify the tag based on the tag pointer within the translation table115 for the logical page. The FTL 114 uses the tag pointer to locate thetag area 404 for the logical page and then retrieves the tag for themost recent physical page from the tag list 420.

In addition, the file system 115 can send a tagged read request to theFTL 114 in the form of READ(BLK#, TAG). This allows the file system 115to specify a specific version of data for a logical page to be read.When the FTL 114 receives a tagged read request, the FTL 114 analyzesthe translation table 116 to identify the tag pointer associated withthe logical page identified within the tagged read request. The FTL 114then locates the tag area 404 for the logical page in the group table402 using the tag pointer. The FTL locates the tag list 420 for thelogical page based on the tag list pointer within the tag area 402. Thetag list 420 is analyzed to identify the physical page comprising a tagthat matches the tag sent within the read request. The FTL 114 thenreturns the version of data stored in that physical page to the filesystem 115.

Associating the tags discussed above with physical pages also allows afile system 115 to perform snapshot and rollback operations at the blocklevel, file level, and file-system levels. For example, with respect toperforming snapshot operations of individual files, the file system 115can send the FTL 114 freeze operations in the form ofFREEZE(GROUP-DATABLKS, INODE#, V#), FREEZE(GROUP-INDIRECT, INODE#, V#),or FREEZE(GROUP-INODE, INODE#, V#). The first variable is the groupnumber corresponding to data blocks, indirect blocks, and inode blocks,etc. The second variable is the ID or inode number discussed above. Thethird variable is the version number of the data in which the filesystem 115 is interested in. The file system 115 can also requestsnapshot operations with respect to the entire file-system. For example,the file system 115 can send the FTL 114 freeze requests in the form ofFREEZE(GROUP-DATABLKS, −1), FREEZE(GROUP-INDIRECT, −1),FREEZE(GROUP-INODE, 1), where the first variable is similar to the firstvariable of the above freeze operation and the second variable indicatesthat the freeze operation is to be performed for all inodes.

When the FTL 114 receives a freeze request from the file system 114, theFTL 114 uses the group number and ID number within the freeze request toidentify the appropriate tag and group data 126. For example, the groupnumber is used to identify the appropriate group table 402. The FTL 114identifies the appropriate tag area 404 within the group table 402 usingthe hash table 128. For example, the ID can be a hash and the hash table128 can include an entry for this hash with a pointer to the associatedtag area 404 for the given logical page. If the version number variablein the freeze request is null, the FTL 114 sets a “freeze” flag in thephysical page comprising the most recent version of the data of logicalpage associated with the ID. In one embodiment, this ‘freeze’ flag ispart of the tag list entry itself. If the version number is not null(i.e., the version number identifies a given version), the FTL 114 setsa “freeze” flag in the physical page comprising the version of dataindicated in the freeze operation. If the ID in the freeze request isidentified as a special case, e.g., −1, the FTL 114 performs theoperations discussed above for each ID (i.e., inode) in the tag andgroup data 126. The FTL 114 can unfreeze the individual blocks, files,or the entire file system by submitting an unfreeze request comprisingvariables similar to the freeze operation discussed above.

The file system 115 can also request a rollback operation by submittinga request in the form of SHIFT(GROUP-DATABLKS, INODE#, V#),SHIFT(GROUP-INDIRECT, INODE#, V#), or SHIFT (GROUP-INODE, INODE#, V#).The variables of the shift request are similar to those discussed abovewith respect to the freeze operation. When the FTL 114 receives a shiftrequest, the FTL 114 performs operations similar to those discussedabove with respect to the freeze operation. However, the FTL sets thelatest translation to the physical page number associated with versionnumber within the shift request. The FTL 114 then moves the tag listentry associated with physical page comprising the version identified bythe shift request to the beginning of the tag list 420. For example,consider an entry in the translation table 116 that indicates thatcurrent physical page with the most recent data is physical page numberPPN4. The FTL 114 receives a shift request of SHIFT(GROUP1, ID1, V1).The FTL 114 rolls back the data for the logical page associated with ID1to the first version (V1) of the data by updating the translation table116 to point to the physical page (e.g., PPN1) associated with the firstversion of data. The FTL 114 also updates the tag list 420 to move thetag list entry for PPN1 to the beginning of the tag list 420.

The file system 115 can release pages that are being maintained for dataversioning by submitting a release request to the FTL 114. The releaserequest can comprise variables that are similar to the freeze operationsdiscussed above. When the FTL receives a release request the FTLreleases the tag (or all the tags for a special v#) associated with thegroup and ID (potentially the whole group) identified in the releaserequest. After the release operation has been performed by the FTL 114,the released pages are ready for garbage collection.

As can be seen from the above discussion, one or more embodimentsprovide data versioning in the flash translation layer (FTL). The FTLkeeps track of “older” versions for each physical page in the flashmemory and supports snapshot and rollback operations. One or moreembodiments also provide a file system that makes use of theversioning-FTL and provides block/file/file-system level data versioningin an efficient manner. Other embodiments, provide a protocol forinteractions between the file system and FTL. The versioning operationssuch as snapshot/rollback are separated from the normal reads/writes.While the normal reads/writes are extended to have “tagged”reads/writes. Versioning operations do not need any data on the bus andare accomplished using freeze/unfreeze/shift protocol operations.

One advantage of the above aspects is that the FTL supports versioningoperations with less traffic on the bus. Very few commands are needed toinitiate the versioning operations. For example, the file systemutilizes the tagged operations of the FTL discussed above to reduce thenumber of writes and provide efficient ways of versioning (andperforming snapshot and rollback operations). For example, the filesystem can make use of the tagged operations and avoid the propagationto the root of the file system by writing new data with different tags(which creates a new version of the user data block alone). This reducesthe number of I/O writes. Another advantage is that versioning can beenabled or disabled at an individual block level. This allows filesystem that do not support versioning to still interact with the FTL. Afurther advantage is that a fewer number of writes from a file-systemperspective are required for writing data to the flash memory. Forexample, where a typical RoW/CoW file-system needs write propagation allthe way to the root (in order to support consistent snapshots), one ormore embodiments eliminate multiple redundant writes by providingability to version at a much finer granularity (because of the FTLsupport). Another advantage is that the file system is provided with theflexibility to choose to version at individual block level, file-levelor the whole file-system level. The file-system can also separatebetween metadata and data as desired.

Operational Flow Diagrams

FIG. 6 is an operational flow diagram illustrating one example of theflash translation layer 114 maintaining a data structure (tag and groupinformation 126) for supporting data versions within a solid statememory 106. It should be noted that a more detailed discussion of theprocess shown in FIG. 6 has been given above with respect to FIGS. 1-5.The operational flow diagram of FIG. 6 begins at step 602 and flowsdirectly to step 604. The FTL 14, at step 604, creates at least one datastructure 402 associated with at least one logical page of a solid statememory 106. The logical page is associated with at least one physicalpage in a data block of the solid state memory 106. The FTL 114, at step606, stores a first set of information 404 associated with the logicalpage in the data structure 402. The FTL 114, at step 608, stores asecond set of information 420 associated with the physical page in thedata structure 402. The FTL 114, at step 610, stores at least versioninginformation within the second set of information 420 identifying whichversion of the logical page is represented by a dataset is stored withinthe physical page. The control flow then exits at step 612.

FIG. 7 is an operational flow diagram illustrating one example of theflash translation layer 114 storing a given version of data within asolid state memory 106. It should be noted that a more detaileddiscussion of the process shown in FIG. 7 has been given above withrespect to FIGS. 1-5. The operational flow diagram of FIG. 7 begins atstep 702 and flows directly to step 704. The FTL 114, at step 704,receives at least one request from a file system 115 to write at leastone dataset to a logical page of a solid state memory 106. The FTL 114,at step 706, identifies at least on physical page in a data block of thesolid state memory 106 associated with the logical page.

The FTL 114, at step 708, stores the at least one dataset in the atleast one physical page. The FTL 114, at step 710, associates least onedata versioning tag with the at least one dataset in a data structureassociated with the logical page. The at least one data versioning tagidentifies the at least one dataset as a given version of the logicalpage. The FTL 114, at step 710, maintains, in response to associatingthe at least one data versioning tag, the at least one dataset asaccessible from the at least one physical page irrespective ofsubsequent write operations to the logical page. The control flow thenexits at step 714.

FIG. 8 is an operational flow diagram illustrating one example of a filesystem 115 interacting with the flash translation 114 in a dataversioning context. It should be noted that a more detailed discussionof the process shown in FIG. 8 has been given above with respect toFIGS. 1-5. The operational flow diagram of FIG. 8 begins at step 802 andflows directly to step 804. The file system 115, at step 804, reserves aplurality of logical pages from a solid state memory. Each logical pagein the plurality of logical pages is associated with a plurality ofphysical pages in the solid state memory. The file system 115, at step806, assigns each logical page in the plurality of logical pages to onegroup in a plurality of groups. The file system 115, at step 808, sendsa request to the FTL 114 for an operation to be performed by the FTL 114on a group in the plurality of groups. The control flow then exits atstep 810.

FIG. 9 is an operational flow diagram illustrating one example of theflash translation layer 114 interacting with a file system 115 forperforming operations on versions of data within a solid state memory106. It should be noted that a more detailed discussion of the processshown in FIG. 9 has been given above with respect to FIGS. 1-5. Theoperational flow diagram of FIG. 8 begins at step 902 and flows directlyto step 904. The FTL 114, at step 904 receives, from a file system 115,at least one request to perform an operation on at least one logicalpage of a solid state memory. The FTL 114, at step 906, identifies adata structure associated with the at least one logical page. The datastructure at least identifies one or more physical pages associated withthe at least one logical page, and a version of the at least one logicalpage represented by a dataset stored in each of the one or more physicalpages. The FTL 114, at step 908, performs the operation on the at leastone logical page based on the data structure that has been identified.The control flow then exits at step 910.

Information Processing System

FIG. 10 shows a schematic of one example of an information processingsystem 1002. Information processing system 1002 is only one example of asuitable system and is not intended to suggest any limitation as to thescope of use or functionality of embodiments of the invention describedherein. Regardless, the information processing system 1002 is capable ofbeing implemented and/or performing any of the functionality set forthhereinabove.

The information processing system 1002 can be a personal computersystem, a server computer system, a thin client, a thick client, ahand-held or laptop device, a tablet computing device, a multiprocessorsystem, a microprocessor-based system, a set top box, a programmableconsumer electronic, a network PC, a minicomputer system, a mainframecomputer system, a distributed cloud computing system, or the like.

As illustrated in FIG. 10, the information processing system 1002 isshown in the form of a general-purpose computing device. The componentsof the information processing system 1002 can include, but are notlimited to, one or more processors or processing units 1004, a systemmemory 1006, and a bus 10010 that couples various system componentsincluding the system memory 1006 to the processor 1004.

The bus 1008 represents one or more of any of several types of busstructures, including a memory bus or memory controller, a peripheralbus, an accelerated graphics port, and a processor or local bus usingany of a variety of bus architectures. By way of example, and notlimitation, such architectures include Industry Standard Architecture(ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA)bus, Video Electronics Standards Association (VESA) local bus, andPeripheral Component Interconnects (PCI) bus.

The information processing system 1002 typically includes a variety ofcomputer system readable media. Such media may be any available mediathat is accessible by the information processing system 1002, and itincludes both volatile and non-volatile media, removable andnon-removable media.

The system memory 1006 can include computer system readable media in theform of volatile memory, such as random access memory (RAM) 1010 and/orcache memory 1012. The information processing system 1002 can furtherinclude other removable/non-removable, volatile/non-volatile computersystem storage media. By way of example only, a storage system 1014 canbe provided for reading from and writing to a non-removable orremovable, non-volatile media such as one or more solid state disks 100and/or magnetic media (not shown and typically called a “hard drive”).Although not shown, a magnetic disk drive for reading from and writingto a removable, non-volatile magnetic disk (e.g., a “floppy disk”), andan optical disk drive for reading from or writing to a removable,non-volatile optical disk such as a CD-ROM, DVD-ROM or other opticalmedia can be provided. In such instances, each can be connected to thebus 1008 by one or more data media interfaces. As will be furtherdepicted and described below, the memory 1006 may include at least oneprogram product having a set (e.g., at least one) of program modulesthat are configured to carry out the functions of various embodiments ofthe invention.

Program/utility 1016, having a set (at least one) of program modules1018, may be stored in memory 1006 by way of example, and notlimitation, as well as an operating system, one or more applicationprograms, other program modules, and program data. Each of the operatingsystem, one or more application programs, other program modules, andprogram data or some combination thereof, may include an implementationof a networking environment. Program modules 1018 generally carry outthe functions and/or methodologies of various embodiments of theinvention as described herein.

The information processing system 1002 can also communicate with one ormore external devices 1020 such as a keyboard, a pointing device, adisplay 1022, etc.; one or more devices that enable a user to interactwith the information processing system 1002; and/or any devices (e.g.,network card, modem, etc.) that enable computer system/server 1002 tocommunicate with one or more other computing devices. Such communicationcan occur via I/O interfaces 1024. Still yet, the information processingsystem 1002 can communicate with one or more networks such as a localarea network (LAN), a general wide area network (WAN), and/or a publicnetwork (e.g., the Internet) via network adapter 1026. As depicted, thenetwork adapter 1026 communicates with the other components ofinformation processing system 1002 via the bus 1008. It should beunderstood that although not shown, other hardware and/or softwarecomponents could be used in conjunction with the information processingsystem 1002. Examples, include, but are not limited to: microcode,device drivers, redundant processing units, external disk drive arrays,RAID systems, tape drives, and data archival storage systems, etc.

Non-Limiting Examples

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method, or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention have been discussed above withreference to flowchart illustrations and/or block diagrams of methods,apparatus (systems) and computer program products according to variousembodiments of the invention. It will be understood that each block ofthe flowchart illustrations and/or block diagrams, and combinations ofblocks in the flowchart illustrations and/or block diagrams, can beimplemented by computer program instructions. These computer programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which execute via the processor of the computer or other programmabledata processing apparatus, create means for implementing thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneor more other features, integers, steps, operations, elements,components, and/or groups thereof.

The description of the present invention has been presented for purposesof illustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

What is claimed is:
 1. A method for maintaining versions of data withina solid state memory, the method comprising: receiving at least onerequest from a file system to write at least one dataset to a logicalpage of a solid state memory; identifying at least one physical page ina data block of the solid state memory associated with the logical page;storing, by a processor, the at least one dataset in the at least onephysical page; associating at least one data versioning tag with the atleast one dataset in a data structure associated with the logical page,wherein the at least one data versioning tag identifies the at least onedataset as a given version of the logical page; and maintaining, inresponse to associating the at least one data versioning tag, the atleast one dataset as accessible from the at least one physical pageirrespective of subsequent write operations to the logical page.
 2. Themethod of claim 1, further comprising: receiving the data versioning tagfrom the file system in the at least one request.
 3. The method of claim1, wherein the data versioning tag comprises a group identifierassociated with the logical page, one of a file system file identifierand a file system directory identifier, and a version identifier,wherein the group identifier is assigned to the logical page by the filesystem and associates the logical page with one of inodes, indirectblocks, data blocks, and special blocks of the file system.
 4. Themethod of claim of 3, wherein the one of a file system file identifierand a file system directory identifier identifies a file and adirectory, respectively, of the file system associated with the logicalpage.
 5. The method of claim 3, wherein the version identifier indicatesa version of the logical page represented by the at least one dataset.6. The method of claim 1, wherein the associating comprises: analyzing alogical-to-physical translation table associated with the solid statememory; and identifying, based on the analyzing, an entry within thelogical-to-physical translation table associated with the logical page.7. The method of claim 6, wherein the associating further comprises:identifying, a data structure pointer stored within the entry, whereinthe data structure point identifies a location of the data structureassociated with the logical page.